<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Placeholders</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Placeholders' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="index.html">inblorb</a></li><li><a href="index.html#3">Chapter 3: Other Material</a></li><li><b>Placeholders</b></li></ul></div>
<p class="purpose">To manage placeholder variables.</p>

<ul class="toc"><li><a href="3-plc.html#SP1">&#167;1. Placeholders</a></li><li><a href="3-plc.html#SP2">&#167;2. Initial values</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. Placeholders.</b>Placeholders are markers such as "[AUTHOR]", found in the template
files for making web pages. ("AUTHOR" would be the name of this one; the use
of capital letters is customary but not required.) Most of these can be set
to arbitrary texts by use of the <span class="extract"><span class="extract-syntax">placeholder</span></span> command in the blurb file, but
a few are "reserved":
</p>

<pre class="definitions code-font"><span class="definition-keyword">define</span> <span class="constant-syntax">SOURCE_RPL</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">SOURCENOTES_RPL</span><span class="plain-syntax"> </span><span class="constant-syntax">2</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">SOURCELINKS_RPL</span><span class="plain-syntax"> </span><span class="constant-syntax">3</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">COVER_RPL</span><span class="plain-syntax"> </span><span class="constant-syntax">4</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">DOWNLOAD_RPL</span><span class="plain-syntax"> </span><span class="constant-syntax">5</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">AUXILIARY_RPL</span><span class="plain-syntax"> </span><span class="constant-syntax">6</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">PAGENUMBER_RPL</span><span class="plain-syntax"> </span><span class="constant-syntax">7</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">PAGEEXTENT_RPL</span><span class="plain-syntax"> </span><span class="constant-syntax">8</span>
</pre>
<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">placeholder</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">pl_name</span><span class="plain-syntax">; </span><span class="comment-syntax"> such as "[AUTHOR]"</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">pl_contents</span><span class="plain-syntax">; </span><span class="comment-syntax"> current value</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">reservation</span><span class="plain-syntax">; </span><span class="comment-syntax"> one of the </span><span class="extract"><span class="extract-syntax">*_RPL</span></span><span class="comment-syntax"> values above, or 0 for unreserved</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">locked</span><span class="plain-syntax">; </span><span class="comment-syntax"> currently being expanded: locked to prevent mise-en-abyme</span>
<span class="plain-syntax">    </span><span class="constant-syntax">CLASS_DEFINITION</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">placeholder</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>The structure placeholder is private to this section.</li></ul>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. Initial values.</b>The <span class="extract"><span class="extract-syntax">BLURB</span></span> refers here to back-cover-style text, and not to the "blurb"
file which we are acting on.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Placeholders::initialise</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">Placeholders::initialise</span></span>:<br/>Main - <a href="1-mn.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"SOURCE"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">SOURCE_RPL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"SOURCENOTES"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">SOURCENOTES_RPL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"SOURCELINKS"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">SOURCELINKS_RPL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"COVER"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">COVER_RPL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"DOWNLOAD"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">DOWNLOAD_RPL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"AUXILIARY"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">AUXILIARY_RPL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"PAGENUMBER"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">PAGENUMBER_RPL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"PAGEEXTENT"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">PAGEEXTENT_RPL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"CBLORBERRORS"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"INBROWSERPLAY"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"INTERPRETERSCRIPTS"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"OTHERCREDITS"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"BLURB"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"TEMPLATE"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Standard"</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">V</span><span class="plain-syntax"> = </span><a href="../foundation/4-sm.html#SP2" class="function-link"><span class="function-syntax">Str::new</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">V</span><span class="plain-syntax">, </span><span class="string-syntax">"inblorb [[Version Number]]"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"GENERATOR"</span><span class="plain-syntax">, </span><span class="identifier-syntax">V</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"BASE64_TOP"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"BASE64_TAIL"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"JAVASCRIPTPRELUDE"</span><span class="plain-syntax">, </span><a href="../foundation/4-sm.html#SP27" class="function-link"><span class="function-syntax">Str::literal</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">JAVASCRIPT_PRELUDE</span><span class="plain-syntax">), </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"FONTTAG"</span><span class="plain-syntax">, </span><a href="../foundation/4-sm.html#SP27" class="function-link"><span class="function-syntax">Str::literal</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">FONT_TAG</span><span class="plain-syntax">), </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"MATERIALSFOLDERPATHOPEN"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"MATERIALSFOLDERPATHFILE"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"BLURB"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>

<span class="plain-syntax">    </span><a href="1-mn.html#SP5" class="function-link"><span class="function-syntax">Main::initialise_time_variables</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>We don't need any very efficient system for parsing these names, as there
are typically fewer than 20 placeholders at a time.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">placeholder</span><span class="plain-syntax"> *</span><span class="function-syntax">Placeholders::find</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">Placeholders::find</span></span>:<br/><a href="3-plc.html#SP6">&#167;6</a>, <a href="3-plc.html#SP7">&#167;7</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">name</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">placeholder</span><span class="plain-syntax"> *</span><span class="identifier-syntax">wv</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">wv</span><span class="plain-syntax">, </span><span class="reserved-syntax">placeholder</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="../foundation/4-sm.html#SP19" class="function-link"><span class="function-syntax">Str::eq</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">name</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">wv</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="function-syntax">Placeholders::read</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">Placeholders::read</span></span>:<br/>Main - <a href="1-mn.html#SP6">&#167;6</a><br/>Blurb Parser - <a href="1-bp.html#SP8">&#167;8</a><br/>Releaser - <a href="3-rls.html#SP5">&#167;5</a>, <a href="3-rls.html#SP6_5">&#167;6.5</a>, <a href="3-rls.html#SP6_8">&#167;6.8</a>, <a href="3-rls.html#SP6_9">&#167;6.9</a>, <a href="3-rls.html#SP7">&#167;7</a>, <a href="3-rls.html#SP8_1">&#167;8.1</a>, <a href="3-rls.html#SP8_2">&#167;8.2</a>, <a href="3-rls.html#SP8_2_1">&#167;8.2.1</a>, <a href="3-rls.html#SP11">&#167;11</a><br/>Links and Auxiliary Files - <a href="3-laaf.html#SP5">&#167;5</a><br/>Website Maker - <a href="3-wm.html#SP11">&#167;11</a>, <a href="3-wm.html#SP15">&#167;15</a>, <a href="3-wm.html#SP15_1">&#167;15.1</a>, <a href="3-wm.html#SP18">&#167;18</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">name</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">placeholder</span><span class="plain-syntax"> *</span><span class="identifier-syntax">wv</span><span class="plain-syntax"> = </span><a href="3-plc.html#SP3" class="function-link"><span class="function-syntax">Placeholders::find</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">wv</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_contents</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>There are no "types" of these placeholders. When they hold numbers, it's only
as the text of a number written out in decimal, so:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Placeholders::set_to_number</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">Placeholders::set_to_number</span></span>:<br/>Main - <a href="1-mn.html#SP5">&#167;5</a>, <a href="1-mn.html#SP7_1">&#167;7.1</a><br/>Blurb Parser - <a href="1-bp.html#SP7_2">&#167;7.2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">var</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">v</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">temp_digits</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">temp_digits</span><span class="plain-syntax">, </span><span class="string-syntax">"%d"</span><span class="plain-syntax">, </span><span class="identifier-syntax">v</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::set_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">var</span><span class="plain-syntax">, </span><span class="identifier-syntax">temp_digits</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">temp_digits</span><span class="plain-syntax">)</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. </b>And here we set a given placeholder to a given text value. If it doesn't
already exist, it will be created. A reserved placeholder can then never again
be set, and since it will have been set at creation time (above), it follows
that a reserved placeholder cannot be set with the <span class="extract"><span class="extract-syntax">placeholder</span></span> command of a
blurb file.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Placeholders::set_to</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">Placeholders::set_to</span></span>:<br/><a href="3-plc.html#SP2">&#167;2</a>, <a href="3-plc.html#SP4">&#167;4</a><br/>Main - <a href="1-mn.html#SP5">&#167;5</a>, <a href="1-mn.html#SP7_1">&#167;7.1</a><br/>Blurb Parser - <a href="1-bp.html#SP7_2">&#167;7.2</a>, <a href="1-bp.html#SP7_2_1">&#167;7.2.1</a>, <a href="1-bp.html#SP7_2_2">&#167;7.2.2</a><br/>Releaser - <a href="3-rls.html#SP6_7">&#167;6.7</a>, <a href="3-rls.html#SP6_8">&#167;6.8</a>, <a href="3-rls.html#SP6_9">&#167;6.9</a>, <a href="3-rls.html#SP9_1">&#167;9.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">var</span><span class="plain-syntax">, </span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">reservation</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP6" class="function-link"><span class="function-syntax">Placeholders::set_to_inner</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">var</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">reservation</span><span class="plain-syntax">, </span><span class="constant-syntax">FALSE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Placeholders::append_to</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">Placeholders::append_to</span></span>:<br/>Blorb Errors - <a href="1-be.html#SP4">&#167;4</a><br/>Releaser - <a href="3-rls.html#SP8_2">&#167;8.2</a>, <a href="3-rls.html#SP12">&#167;12</a>, <a href="3-rls.html#SP12_1">&#167;12.1</a>, <a href="3-rls.html#SP12_2">&#167;12.2</a>, <a href="3-rls.html#SP12_3">&#167;12.3</a>, <a href="3-rls.html#SP12_4">&#167;12.4</a>, <a href="3-rls.html#SP12_5">&#167;12.5</a>, <a href="3-rls.html#SP12_6">&#167;12.6</a>, <a href="3-rls.html#SP12_7">&#167;12.7</a>, <a href="3-rls.html#SP12_8">&#167;12.8</a>, <a href="3-rls.html#SP12_9">&#167;12.9</a>, <a href="3-rls.html#SP12_10">&#167;12.10</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">var</span><span class="plain-syntax">, </span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">text</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP6" class="function-link"><span class="function-syntax">Placeholders::set_to_inner</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">var</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="constant-syntax">TRUE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. </b>Where:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Placeholders::set_to_inner</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">Placeholders::set_to_inner</span></span>:<br/><a href="3-plc.html#SP5">&#167;5</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">var</span><span class="plain-syntax">, </span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">reservation</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">extend</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">verbose_mode</span><span class="plain-syntax">) </span><span class="identifier-syntax">PRINT</span><span class="plain-syntax">(</span><span class="string-syntax">"! [%S] &lt;-- \"%S\"\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">var</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">);</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">placeholder</span><span class="plain-syntax"> *</span><span class="identifier-syntax">wv</span><span class="plain-syntax"> = </span><a href="3-plc.html#SP3" class="function-link"><span class="function-syntax">Placeholders::find</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">var</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">wv</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">reservation</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">)) { </span><a href="1-be.html#SP3" class="function-link"><span class="function-syntax">BlorbErrors::error_1S</span></a><span class="plain-syntax">(</span><span class="string-syntax">"tried to set reserved variable %S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">var</span><span class="plain-syntax">); </span><span class="reserved-syntax">return</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">wv</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">wv</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CREATE</span><span class="plain-syntax">(</span><span class="reserved-syntax">placeholder</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">verbose_mode</span><span class="plain-syntax">) </span><span class="identifier-syntax">PRINT</span><span class="plain-syntax">(</span><span class="string-syntax">"! Creating [%S]\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">var</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_name</span><span class="plain-syntax"> = </span><a href="../foundation/4-sm.html#SP3" class="function-link"><span class="function-syntax">Str::duplicate</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">var</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_contents</span><span class="plain-syntax"> = </span><a href="../foundation/4-sm.html#SP2" class="function-link"><span class="function-syntax">Str::new</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">reservation</span><span class="plain-syntax"> = </span><span class="identifier-syntax">reservation</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">extend</span><span class="plain-syntax">) </span><a href="../foundation/4-sm.html#SP17" class="function-link"><span class="function-syntax">Str::concatenate</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_contents</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><a href="../foundation/4-sm.html#SP17" class="function-link"><span class="function-syntax">Str::copy</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_contents</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. </b>And that just leaves writing the output of these placeholders. The scenario
here is that we're copying HTML over to make a new web page, but we've hit
text in the template like "[AUTHOR]". We output the value of this
placeholder instead of that literal text. The reserved placeholders output as
special gadgets instead of any fixed text, so those all call suitable
routines elsewhere in Inblorb.
</p>

<p class="commentary">If the placeholder name isn't known to us, we print the text back, so that the
original material will be unchanged. (This is in case the original contains
uses of square brackets which aren't for placeholding.)
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">escape_quotes_mode</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Placeholders::write</span><button class="popup" onclick="togglePopup('usagePopup8')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup8">Usage of <span class="code-font"><span class="function-syntax">Placeholders::write</span></span>:<br/><a href="3-plc.html#SP7_1">&#167;7.1</a><br/>Solution Deviser - <a href="3-sd.html#SP12">&#167;12</a><br/>Website Maker - <a href="3-wm.html#SP10">&#167;10</a></span></button><span class="plain-syntax">(</span><span class="constant-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">var</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">multiparagraph_mode</span><span class="plain-syntax"> = </span><span class="constant-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">eqm</span><span class="plain-syntax"> = </span><span class="identifier-syntax">escape_quotes_mode</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="../foundation/4-sm.html#SP13" class="function-link"><span class="function-syntax">Str::get_first_char</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">var</span><span class="plain-syntax">) == </span><span class="character-syntax">'*'</span><span class="plain-syntax">) { </span><a href="../foundation/4-sm.html#SP25" class="function-link"><span class="function-syntax">Str::delete_first_character</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">var</span><span class="plain-syntax">); </span><span class="identifier-syntax">escape_quotes_mode</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="../foundation/4-sm.html#SP13" class="function-link"><span class="function-syntax">Str::get_first_char</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">var</span><span class="plain-syntax">) == </span><span class="character-syntax">'*'</span><span class="plain-syntax">) { </span><a href="../foundation/4-sm.html#SP25" class="function-link"><span class="function-syntax">Str::delete_first_character</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">var</span><span class="plain-syntax">); </span><span class="identifier-syntax">escape_quotes_mode</span><span class="plain-syntax"> = </span><span class="constant-syntax">2</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="../foundation/4-sm.html#SP19" class="function-link"><span class="function-syntax">Str::eq</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">var</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"BLURB"</span><span class="plain-syntax">)) </span><span class="identifier-syntax">multiparagraph_mode</span><span class="plain-syntax"> = </span><span class="constant-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">placeholder</span><span class="plain-syntax"> *</span><span class="identifier-syntax">wv</span><span class="plain-syntax"> = </span><a href="3-plc.html#SP3" class="function-link"><span class="function-syntax">Placeholders::find</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">var</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">wv</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">locked</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"[%S]"</span><span class="plain-syntax">, </span><span class="identifier-syntax">var</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">locked</span><span class="plain-syntax"> = </span><span class="constant-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">multiparagraph_mode</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"&lt;p&gt;"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">reservation</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="constant-syntax">0</span><span class="plain-syntax">: </span><span class="named-paragraph-container code-font"><a href="3-plc.html#SP7_1" class="named-paragraph-link"><span class="named-paragraph">Copy an ordinary unreserved placeholder</span><span class="named-paragraph-number">7.1</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SOURCE_RPL:</span><span class="plain-syntax"> </span><a href="3-wm.html#SP20" class="function-link"><span class="function-syntax">Websites::expand_SOURCE_or_SOURCENOTES_variable</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="constant-syntax">FALSE</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SOURCENOTES_RPL:</span><span class="plain-syntax"> </span><a href="3-wm.html#SP20" class="function-link"><span class="function-syntax">Websites::expand_SOURCE_or_SOURCENOTES_variable</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="constant-syntax">TRUE</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SOURCELINKS_RPL:</span><span class="plain-syntax"> </span><a href="3-wm.html#SP18" class="function-link"><span class="function-syntax">Websites::expand_SOURCELINKS_variable</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">COVER_RPL:</span><span class="plain-syntax"> </span><a href="3-laaf.html#SP7" class="function-link"><span class="function-syntax">Links::expand_COVER_variable</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">DOWNLOAD_RPL:</span><span class="plain-syntax"> </span><a href="3-laaf.html#SP5" class="function-link"><span class="function-syntax">Links::expand_DOWNLOAD_variable</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">AUXILIARY_RPL:</span><span class="plain-syntax"> </span><a href="3-laaf.html#SP4" class="function-link"><span class="function-syntax">Links::expand_AUXILIARY_variable</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">PAGENUMBER_RPL:</span><span class="plain-syntax"> </span><a href="3-wm.html#SP16" class="function-link"><span class="function-syntax">Websites::expand_PAGENUMBER_variable</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">PAGEEXTENT_RPL:</span><span class="plain-syntax"> </span><a href="3-wm.html#SP17" class="function-link"><span class="function-syntax">Websites::expand_PAGEEXTENT_variable</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">multiparagraph_mode</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"&lt;/p&gt;"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">locked</span><span class="plain-syntax"> = </span><span class="constant-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">escape_quotes_mode</span><span class="plain-syntax"> = </span><span class="identifier-syntax">eqm</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7_1" class="paragraph-anchor"></a><b>&#167;7.1. </b>Note that the [BLURB] placeholder &mdash; which holds the story description, and is
like a back cover blurb for a book; the name is not related to the release
instructions format &mdash; may consist of multiple paragraphs. If so, then they
will be divided by <span class="extract"><span class="extract-syntax">&lt;br/&gt;</span></span>, since that's the XML convention. But we want to
translate those breaks to <span class="extract"><span class="extract-syntax">&lt;/p&gt;&lt;p&gt;</span></span>, closing an old paragraph and opening
a new one, because that will make the blurb text much easier to style
with a CSS file. It follows that [BLURB] should always appear in templates
within an HTML paragraph.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Copy an ordinary unreserved placeholder</span><span class="named-paragraph-number">7.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">L</span><span class="plain-syntax"> = </span><a href="../foundation/4-sm.html#SP8" class="function-link"><span class="function-syntax">Str::len</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_contents</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">L</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> </span><span class="identifier-syntax">c</span><span class="plain-syntax"> = </span><a href="../foundation/4-sm.html#SP13" class="function-link"><span class="function-syntax">Str::get_at</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_contents</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">'&lt;'</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            (</span><a href="../foundation/4-sm.html#SP13" class="function-link"><span class="function-syntax">Str::get_at</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_contents</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">+1) == </span><span class="character-syntax">'b'</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            (</span><a href="../foundation/4-sm.html#SP13" class="function-link"><span class="function-syntax">Str::get_at</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_contents</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">+2) == </span><span class="character-syntax">'r'</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            (</span><a href="../foundation/4-sm.html#SP13" class="function-link"><span class="function-syntax">Str::get_at</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_contents</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">+3) == </span><span class="character-syntax">'/'</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            (</span><a href="../foundation/4-sm.html#SP13" class="function-link"><span class="function-syntax">Str::get_at</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_contents</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">+4) == </span><span class="character-syntax">'&gt;'</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">multiparagraph_mode</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"&lt;/p&gt;&lt;p&gt;"</span><span class="plain-syntax">); </span><span class="identifier-syntax">i</span><span class="plain-syntax"> += </span><span class="constant-syntax">4</span><span class="plain-syntax">; </span><span class="reserved-syntax">continue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">'['</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">inner_name</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">expanded</span><span class="plain-syntax"> = </span><span class="constant-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">j</span><span class="plain-syntax"> = </span><span class="identifier-syntax">i</span><span class="plain-syntax">+1; </span><span class="identifier-syntax">j</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">L</span><span class="plain-syntax">; </span><span class="identifier-syntax">j</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> </span><span class="identifier-syntax">c</span><span class="plain-syntax"> = </span><a href="../foundation/4-sm.html#SP13" class="function-link"><span class="function-syntax">Str::get_at</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pl_contents</span><span class="plain-syntax">, </span><span class="identifier-syntax">j</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">'['</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">' '</span><span class="plain-syntax">)) </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">']'</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><span class="identifier-syntax">j</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><a href="3-plc.html#SP7" class="function-link"><span class="function-syntax">Placeholders::write</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">inner_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">expanded</span><span class="plain-syntax"> = </span><span class="constant-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">inner_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">c</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">inner_name</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">expanded</span><span class="plain-syntax">) </span><span class="reserved-syntax">continue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (((</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">'\x0a'</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">'\x0d'</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">'\x7f'</span><span class="plain-syntax">)) &amp;&amp; (</span><span class="identifier-syntax">multiparagraph_mode</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"&lt;p&gt;"</span><span class="plain-syntax">); </span><span class="reserved-syntax">continue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">escape_quotes_mode</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">'\''</span><span class="plain-syntax">)) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"&amp;#39;"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">escape_quotes_mode</span><span class="plain-syntax"> == </span><span class="constant-syntax">2</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">'\''</span><span class="plain-syntax">)) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%%2527"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%c"</span><span class="plain-syntax">, </span><span class="identifier-syntax">c</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-plc.html#SP7">&#167;7</a>.</li></ul>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="3-laaf.html">&#10094;</a></li><li class="progresschapter"><a href="M-ui.html">M</a></li><li class="progresschapter"><a href="1-bsc.html">1</a></li><li class="progresschapter"><a href="2-bw.html">2</a></li><li class="progresscurrentchapter">3</li><li class="progresssection"><a href="3-rls.html">rls</a></li><li class="progresssection"><a href="3-sd.html">sd</a></li><li class="progresssection"><a href="3-laaf.html">laaf</a></li><li class="progresscurrent">plc</li><li class="progresssection"><a href="3-tmp.html">tmp</a></li><li class="progresssection"><a href="3-wm.html">wm</a></li><li class="progresssection"><a href="3-bs6.html">bs6</a></li><li class="progressnext"><a href="3-tmp.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

